package com.cskaoyan.mapper;

import com.cskaoyan.bean.MallCart;
import com.cskaoyan.bean.MallCartExample;
import com.cskaoyan.model.bo.wxcart.CartUpdateBo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MallCartMapper {
    long countByExample(MallCartExample example);

    int deleteByExample(MallCartExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MallCart record);

    int insertSelective(MallCart record);

    List<MallCart> selectByExample(MallCartExample example);

    MallCart selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MallCart record, @Param("example") MallCartExample example);

    int updateByExample(@Param("record") MallCart record, @Param("example") MallCartExample example);

    int updateByPrimaryKeySelective(MallCart record);

    int updateByPrimaryKey(MallCart record);

    int updateCheckedByUserIdAndProductId(@Param("productId") Integer productId, @Param("isChecked") boolean isChecked, @Param("userId") Integer userId);

    Integer updateCartMsgById(@Param("bo") CartUpdateBo bo, @Param("userId") Integer userId);

    Integer deleteCartByProductId(@Param("productId") Integer productId, @Param("userId") Integer userId);

}
